package com.bugRecord.service;

import com.bugRecord.bean.Bug;
import com.bugRecord.dao.DaoFactory;
import com.bugRecord.dao.IBugRecordDao;

public class OperateBugService implements IOperateService {

	public String addObject(Object obj) {
		Bug bug = (Bug)obj;
		String sql = "insert into bug(bugName,createDate) values('"+bug.getBugName()+"','"+bug.getCreateDate()+"')";
		IBugRecordDao dao =  DaoFactory.createDao("access");
		String result = dao.add(sql);
		return result;
	}

	public String deleteObject(Object obj) {
		return null;
	}

	public String modifyObject(Object obj) {
		return null;
	}

}
